/*
 * Simple Interpreter
 * Group 3
 * CS 2110
 */

#include <stdio.h>
#include "error.h"
#include "loader.h"

int main(int argc, char * argv[])
{
	simple_file_t source;
	
	/* Check that there are exactly two command line arguments (the name of the program and
	   and name of the Simple file). */
	if (argc != 2)
	{
		printf("Please re-run the program and provide the name of the file to execute as a command-line argument.\n");
		return 1;
	}
	
	source = simple_load_file(argv[1]);
	
	/* Print the lines for testing purposes. */
	
	int i = 0;
	for (; i < source.line_count; ++i)
	{
		printf("%s\n", source.lines[i]->rest);
	}
	
	return 0;
}
